package main

import (
	"fmt"
	"github.com/robfig/cron/v3"
)

func main() {
	c := cron.New()
	c.Start()

	c.AddFunc("@every 10s", func() {
		fmt.Println("10s输出一次")
	})

	c.AddFunc("@every 1s", func() {
		fmt.Println("1s输出一次")
	})

	c.AddFunc("@every 5s", func() {
		fmt.Println("5s输出一次")
	})

	select {}
}

//func main() {
//	c := cron.New()
//
//	c.Start()
//}
